package com.blockchain.front.service.financial;

import java.math.BigDecimal;

import com.blockchain.common.enums.GdState;
import com.blockchain.framework.service.Service;
import com.blockchain.framework.service.query.Paging;
import com.blockchain.framework.service.query.PagingResult;
import com.blockchain.front.service.common.entity.GdEntity;

/**
 * 财务中心
 * 
 */
public abstract interface GdManage extends Service {


	
	/**
	 * 增加挂单记录
	 * @throws Throwable
	 */
	public abstract void addGdOrder(GdEntity gdEntity) throws Throwable;
	
	/**
	 * 查询挂单记录
	 * @throws Throwable
	 */
	public abstract PagingResult<GdEntity> searchJl(GdState zt,Paging paging) throws Throwable;
	
	/**
	 * 查询挂单详细
	 * 
	 * @param id
	 * @return
	 * @throws Throwable
	 */
	public GdEntity get(int id) throws Throwable;

	/**
	 * 挂单人修改挂单信息
	 * 
	 * @param id
	 * @param gdEntity 
	 * @param sxfl 
	 * @return
	 * @throws Throwable
	 */
	public abstract void updateGd(int id, GdState gdState, GdEntity gdEntity) throws Throwable;
	
	/**
	 * 挂单拍下
	 * 
	 * @param id
	 * @param gdEntity 
	 * @return
	 * @throws Throwable
	 */
	public abstract void gdBuy(int id) throws Throwable;
	
	/**
	 * 取消拍单
	 * 
	 * @param id
	 * @param gdEntity 
	 * @return
	 * @throws Throwable
	 */
	public abstract void qxBuy(int id) throws Throwable;
	
	/**
	 * 获取挂单列表
	 * 
	 * @param id
	 * @param gdEntity 
	 * @return
	 * @throws Throwable
	 */
	public abstract PagingResult<GdEntity> getGdList(Paging paging) throws Throwable;
	
	/**
	 * 查询拍单记录
	 * @throws Throwable
	 */
	public abstract PagingResult<GdEntity> searchPd(Paging paging) throws Throwable;

	/**
	 * 自定义数量拍单
	 * @param id
	 * @param pdrdh 
	 * @param pdrxm 
	 */
	public abstract void pxGd(int id, GdState gdState, BigDecimal pdsl, String pdrxm, String pdrdh) throws Throwable;
	/**
	 *更新拍单
	 * @param id
	 */
	public abstract void updatePd(int id, GdState pdState) throws Throwable;
	
	public abstract GdEntity getPd(int id) throws Throwable  ;

	/**
	 *获取这个挂单的拍单列表
	 * @param id
	 */
	public abstract GdEntity[] getPdson(int id) throws Throwable  ;
	
	/**
	 *修改挂单子单
	 * @param id
	 */
	public abstract void updateGdSon(int id, GdState gdState) throws Throwable  ;

}
